import { showToast } from "vant";

const callback = () => {
  showToast("建设中，敬请期待！");
};

export const vToBuild = {
  mounted(el, binding) {
    if (
      (binding.modifiers.check === true && binding.value) ||
      !binding.modifiers.check
    ) {
      el.addEventListener("click", callback);
    }
  },
  // 绑定元素的父组件卸载后调用
  unmounted(el) {
    el.removeEventListener("click", callback);
  },
};
